﻿Imports System
Imports System.Collections.Specialized
Imports System.Configuration

Namespace System.Workflow.Runtime.Configuration
    Public Class WorkflowRuntimeServiceElement
        Inherits ConfigurationElement
        ' Methods
        Protected Overrides Function OnDeserializeUnrecognizedAttribute(ByVal name As String, ByVal value As String) As Boolean
            Me._parameters.Add(name, value)
            Return True
        End Function


        ' Properties
        Public ReadOnly Property Parameters As NameValueCollection
            Get
                Return Me._parameters
            End Get
        End Property

        <ConfigurationProperty("type", DefaultValue:=Nothing)> _
        Public Property Type As String
            Get
                Return CStr(MyBase.Item("type"))
            End Get
            Set(ByVal value As String)
                If (value Is Nothing) Then
                    Throw New ArgumentNullException("value")
                End If
                MyBase.Item("type") = value
            End Set
        End Property


        ' Fields
        Private _parameters As NameValueCollection = New NameValueCollection
        Private Const _type As String = "type"
    End Class
End Namespace

